package com.zat.mes.andrmes.customerview

import android.app.Dialog
import android.content.Context
import android.view.Gravity
import android.view.LayoutInflater
import android.view.WindowManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.bumptech.glide.Glide
import com.zat.mes.andrmes.R
import com.zat.mes.andrmes.customerview.adapter.BottomDialogAdapter
import com.zat.mes.andrmes.data.ParantTypeItem
import kotlinx.android.synthetic.main.layout_dialog_bottom.view.*
import kotlinx.android.synthetic.main.show_photo_view.view.*

/**
 * 通用底部弹框
 */
class PicDailog : Dialog {


    constructor(
        context: Context,
        pic:String
    ) : super(context, R.style.MyDialog) {
        val contentView = LayoutInflater.from(context).inflate(R.layout.show_photo_view, null)
        setContentView(contentView)
        val layoutParams = window?.getAttributes()
        layoutParams?.width = WindowManager.LayoutParams.MATCH_PARENT
        layoutParams?.height = WindowManager.LayoutParams.MATCH_PARENT
        window?.attributes = layoutParams
        Glide.with(context).load(pic).into(contentView.photoViewshow)
        contentView.photoViewshow.setOnClickListener { dismiss() }
    }


}